package com.itboye.ihomebank.choosecity;

import java.util.ArrayList;

import android.annotation.SuppressLint;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;

import com.itboye.ihomebank.R;
import com.itboye.ihomebank.adapter.NavigationAdapter;
import com.itboye.ihomebank.base.BaseOtherActivity;
import com.itboye.ihomebank.base.NavigationBean;
/**
 * 搜索出的地址（导航）
 *
 */
public class Navigationactivity extends BaseOtherActivity{

	ListView listView;
	NavigationAdapter adapter;
	private ArrayList<NavigationBean> dataList=new ArrayList<NavigationBean>();
	TextView add_shap_title_tv;//标题
	ImageView close_icon;
	String cityCode="";
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		
	}
	@Override
	protected int layout_id() {
		return R.layout.activity_navigation;
	}
	@SuppressLint("ResourceAsColor") @Override
	protected void onInitController() {
		setStatusBarColor(R.color.home_blue);
		cityCode=getIntent().getStringExtra("cityCode");
//		getDetailNaigation(cityCode);
		add_shap_title_tv.setText("导航");
		close_icon.setOnClickListener(new OnClickListener() {
			
			@Override
			public void onClick(View v) {
				// TODO Auto-generated method stub
				finish();
			}
		});
		adapter=new NavigationAdapter(dataList,this);
		listView.setAdapter(adapter);
//		initData();
		
	}
	@Override
	protected void onInit() {
		// TODO Auto-generated method stub
		
	}
	@Override
	protected void onReadIntent(Bundle bundle) {
		// TODO Auto-generated method stub
		
	}
	
	/*private void getDetailNaigation(String cityCode2) {
		// TODO Auto-generated method stub
		MyJsonRequest.Builder<ArrayList<NavigationBean>> builder = new MyJsonRequest.Builder<ArrayList<NavigationBean>>()
				.param("city", cityCode).apiVer("100")
				.typeKey("BY_BranchOffice_search")
				.requestListener(new XRequestListener<ArrayList<NavigationBean>>() {

					@Override
					public void onResponse(ArrayList<NavigationBean> orderBean) {
						Log.v("count",orderBean.size()+"");
						if(orderBean!=null)
						dataList.addAll(orderBean);
						adapter.notifyDataSetChanged();

					}
				}).errorListener(new XErrorListener() {

					@Override
					public void onErrorResponse(Exception exception, int code,
							String msg) {
						// onPullDownError(adapter, xlistview, exception, code,
						// msg);

						ByAlert.alert(msg+"");
					}
				});

		MyJsonRequest<ArrayList<NavigationBean>> request = builder.build();
		HttpRequest.getDefaultRequestQueue().add(request);
	}*/
	
	
}
